package com.lagou.service;

import com.lagou.bean.Student;
import com.lagou.dao.StudentViewDao;
import com.lagou.factory.StudentViewDaoFactory;

import java.util.List;

/**
 * 编程实现显示所有学生类的功能
 */
public class StudentViewSerive {
    /**
     * 自定义成员变量记录学生访问对象
     */
    StudentViewDao studentViewDao;

    /**
     * 对变量初始化
     */
    public StudentViewSerive() {
        this.studentViewDao = StudentViewDaoFactory.getStudentViewDao();
    }

    /**
     * 自定义成员方法查找所有学生
     * @return
     */
    public List<Student> studentView(){
        return studentViewDao.StudentView();
    }
}
